package oppsa.controller;

import java.sql.Date;
//Variables
public class Comment {
	private int sequence;
	private String commentTxt;
	private Date commentDate;
	private int seqAction;
	private int seqUser;
	
	public Comment ()
	{
		this.sequence = 0;
		this.commentTxt = "";
		this.commentDate = null;
		this.seqAction = 0;
		this.seqUser = 0;
	}
	public Comment(int sequence, String commentTxt,
			Date commentDate, int seqAction, int seqUser) {
		this.sequence = sequence;
		this.commentTxt = commentTxt;
		this.commentDate = commentDate;
		this.seqAction = seqAction;
		this.seqUser = seqUser;
	}
	
	public Comment(Comment c) {
		this.sequence = c.sequence;
		this.commentTxt = c.commentTxt;
		this.commentDate = c.commentDate;
		this.seqAction = c.seqAction;
		this.seqUser = c.seqUser;
	}
	//Getters & Setters
	
	public int getSequence() {
		return sequence;
	}
	public void setSequence(int sequence) {
		this.sequence = sequence;
	}
	public String getCommentTxt() {
		return commentTxt;
	}
	public void setCommentTxt(String commentTxt) {
		this.commentTxt = commentTxt;
	}
	public Date getCommentDate() {
		return commentDate;
	}
	public void setCommentDate(Date commentDate) {
		this.commentDate = commentDate;
	}
	public int getseqAction() {
		return seqAction;
	}
	public void setseqAction(int seqAction) {
		this.seqAction = seqAction;
	}
	public int getseqUser() {
		return seqUser;
	}
	public void setseqUser(int seqUser) {
		this.seqUser = seqUser;
	}
	
	public boolean compareTo(Comment c)
	{
		
		if (this.sequence == c.sequence && this.commentDate == c.commentDate && this.commentTxt.equals(c.commentTxt)
				&& this.seqAction == c.seqAction && this.seqUser == c.seqUser) {
				return true;
		}
		
		return false;
	}
	
	
}
